package com.topup.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.topup.pojo.Histories;
import com.topup.pojo.Student;

public interface HistoriesMapper {
	
	@Insert("INSERT INTO tb_histories VALUES(NULL,#{card.cardId},#{time},#{money},#{stu.id},#{order_num});")
	int addorder(Histories his);
	
	@Select("SELECT * FROM tb_stu WHERE  id = #{stu-id}\r\n" + 
			"")
	Student selectMon(@Param("stu_id")int stu_id);
	
	/* @Select("   SELECT s.cardId cid,s.time time,s.order_num,s.money money FROM tb_histories s ,tb_card c WHERE s.cardId = c.cardId AND s.stu_id  =#{id}")
	*/

	
	public List<Histories> selone(@Param("sid") int sid);

}
